package model

import model.inter.DestoryAble
import org.itheima.kotlin.game.core.Painter

class BlastView(override var x: Int, override var y: Int):View(x=x,y=y),DestoryAble {


    private lateinit var imaUrl:String

    var imgIndex=1;

    override fun isNeedDestory(): Boolean =imgIndex>31


    override fun draw() {

        imaUrl="img/blast_$imgIndex.png"
        Painter.drawImage(imaUrl,x,y)
        imgIndex++;
    }

}